<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="" xml:lang="">
  <head>
    <meta charset="utf-8" />
    <meta name="generator" content="pandoc" />
    <meta
      name="viewport"
      content="width=device-width, initial-scale=1.0, user-scalable=yes"
    />
    <title>step_4</title>
    <style type="text/css">
      code {
        white-space: pre-wrap;
      }
      span.smallcaps {
        font-variant: small-caps;
      }
      span.underline {
        text-decoration: underline;
      }
      div.column {
        display: inline-block;
        vertical-align: top;
        width: 50%;
      }
    </style>
  </head>
  <body>
    <h2 id="step-4-use-the-built-in-library-datetime">
      Step 4: Use the built-in library datetime
    </h2>
    <p>
      Use the built-in library datetime and the function
      <code>datetime.datetime.now()</code> to determine the current year and
      print that to REPL using an f-string.
    </p>
    <pre><code>&gt;&gt;&gt; import datetime
&gt;&gt;&gt; right_now = datetime.datetime.now()
&gt;&gt;&gt; # What is this thing?
&gt;&gt;&gt; right_now
datetime.datetime(2020, 7, 10, 14, 41, 33, 790353)
&gt;&gt;&gt; print(f&quot;What a crazy year {right_now.year} has been, eh?&quot;)
What a crazy year 2020 has been, eh?
&gt;&gt;&gt;</code></pre>
  </body>
</html>
